package com.fll.fangyicommon.entity.user;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author fll
 * @create 2023/2/24
 */
@Setter
@Getter
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {

    @TableId
    private Integer userId;
    //用户电话-11位-登录账号
    private String userPhone;
    private String userPass;
    private String sex;
    private Integer age;
    //用户昵称
    private String nickName;
    private String email;
    //个性签名
    private String userDescribe;
    //用户注册时间
    private String userRegtime;
    //预留,暂未使用
    private String yl;

    @TableField(exist = false)
    //外键，oss实体类中存图片
    private Oss oss;

    @TableField(exist = false)
    private int friendCount; //好友数

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", userPhone='" + userPhone + '\'' +
                ", userPass='" + userPass + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", nickName='" + nickName + '\'' +
                ", email='" + email + '\'' +
                ", userDescribe='" + userDescribe + '\'' +
                ", userRegtime='" + userRegtime + '\'' +
                ", yl='" + yl + '\'' +
                ", oss=" + oss +
                ", friendCount=" + friendCount +
                '}';
    }
}
